import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
let defaultCity="长沙"
    defaultCity=localStorage.city
const state={
	// vuex 属性值
	city:defaultCity
}

const mutations={
	// vuex 组件方法
	changName(state,cityName){
		state.city=cityName;
		localStorage.city=cityName
	}
	
}


export default new Vuex.Store({
	state,
	mutations
})

